package com.huawei.zyb.taskManager.application.requirement.dto;

import com.huawei.zyb.taskManager.domain.requirement.valueobject.RequirementPriority;
import com.huawei.zyb.taskManager.domain.requirement.valueobject.RequirementStatus;

import java.time.LocalDateTime;

/**
 * 需求数据传输对象
 */
public class RequirementDTO {
    
    private Long id;
    private String title;
    private String description;
    private RequirementStatus status;
    private RequirementPriority priority;
    private Long projectId;
    private String ownerId;
    private String projectName;  // 项目名称
    private String ownerName;    // 负责人姓名
    private LocalDateTime expectedCompletionDate;  // 预期完成时间
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    
    public RequirementDTO() {
    }
    
    public RequirementDTO(Long id, String title, String description,
                          RequirementStatus status, RequirementPriority priority,
                          Long projectId, String ownerId, String projectName, String ownerName,
                          LocalDateTime expectedCompletionDate, LocalDateTime createdAt, LocalDateTime updatedAt) {
        this.id = id;
        this.title = title;
        this.description = description;
        this.status = status;
        this.priority = priority;
        this.projectId = projectId;
        this.ownerId = ownerId;
        this.projectName = projectName;
        this.ownerName = ownerName;
        this.expectedCompletionDate = expectedCompletionDate;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public RequirementStatus getStatus() {
        return status;
    }
    
    public void setStatus(RequirementStatus status) {
        this.status = status;
    }
    
    public RequirementPriority getPriority() {
        return priority;
    }
    
    public void setPriority(RequirementPriority priority) {
        this.priority = priority;
    }
    
    public Long getProjectId() {
        return projectId;
    }
    
    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }
    
    public String getOwnerId() {
        return ownerId;
    }
    
    public void setOwnerId(String ownerId) {
        this.ownerId = ownerId;
    }
    
    public String getProjectName() {
        return projectName;
    }
    
    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }
    
    public String getOwnerName() {
        return ownerName;
    }
    
    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }
    
    public LocalDateTime getExpectedCompletionDate() {
        return expectedCompletionDate;
    }
    
    public void setExpectedCompletionDate(LocalDateTime expectedCompletionDate) {
        this.expectedCompletionDate = expectedCompletionDate;
    }
    
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
    
    @Override
    public String toString() {
        return "RequirementDTO{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", description='" + description + '\'' +
                ", status=" + status +
                ", priority=" + priority +
                ", projectId=" + projectId +
                ", ownerId=" + ownerId +
                ", projectName='" + projectName + '\'' +
                ", ownerName='" + ownerName + '\'' +
                ", expectedCompletionDate=" + expectedCompletionDate +
                ", createdAt=" + createdAt +
                ", updatedAt=" + updatedAt +
                '}';
    }
}